<ion-header>
  <ion-toolbar>
    <ion-buttons  slot="start">
      <ion-back-button text="我的"></ion-back-button>
    </ion-buttons>
    <ion-title style="padding-left: 25%;">个人信息</ion-title>
  </ion-toolbar>
</ion-header>

<ion-content>
  <div>
    <form>
      <ion-list>
        <ion-item lines="none">
          <!-- <ion-icon name="person-sharp"></ion-icon> -->
          <ion-label>工号/学号</ion-label>
          <ion-input name="peNumber" type="text" placeholder="请填写工号/学号" required="true" [(ngModel)]="peNumber" >
          </ion-input>
        </ion-item>
        <!-- <ion-item>
          <ion-input name="peNumber" type="text" placeholder="请填写工号/学号" required="true" [(ngModel)]="peNumber" >
            </ion-input>
        </ion-item> -->

        <ion-item lines="none">
          <!-- <ion-icon name="person-circle-sharp"></ion-icon> -->
          <ion-label>姓名</ion-label>
          <ion-input name="peName" type="text" placeholder="请填写姓名" required="true" [(ngModel)]="peName" >
          </ion-input>
        </ion-item>
        <!-- <ion-item>
          <ion-input name="peName" type="text" placeholder="请填写姓名" required="true" [(ngModel)]="peName" >
            </ion-input>
        </ion-item> -->

        <ion-list>
          <ion-radio-group (ionChange)="checkGender($event)" value="{{gender}}">
            <ion-list-header>
              <ion-label>性别</ion-label>
            </ion-list-header>
        
            <ion-item>
              <ion-label>男</ion-label>
              <ion-radio slot="start" value="1" ></ion-radio>
            </ion-item>
        
            <ion-item>
              <ion-label>女</ion-label>
              <ion-radio slot="start" value="0" ></ion-radio>
            </ion-item>
            
          </ion-radio-group>
        </ion-list>

        <ion-list>
          <ion-item>
            <ion-label>学校</ion-label>
            <ion-select (ionChange)="getSchoolId($event)">
              <ion-select-option *ngFor="let school of schools" value='{{school.sId}}'>{{school.sName}}</ion-select-option>
            </ion-select>
          </ion-item>
        </ion-list>

        <ion-list>
          <ion-item>
            <ion-label>专业</ion-label>
            <ion-select (ionChange)="getMajor($event)">
              <ion-select-option *ngFor="let major of majors" value='{{major}}'>{{major}}</ion-select-option>
            </ion-select>
          </ion-item>
        </ion-list>

        <ion-list>
          <ion-item>
            <ion-label>年级</ion-label>
            <ion-select (ionChange)="getGrade($event)" value='grade'>
              <ion-select-option value='2015'>2015</ion-select-option>
              <ion-select-option value='2016'>2016</ion-select-option>
              <ion-select-option value='2017'>2017</ion-select-option>
              <ion-select-option value='2018'>2018</ion-select-option>
              <ion-select-option value='2019'>2019</ion-select-option>
              <ion-select-option value='2020'>2020</ion-select-option>
            </ion-select>
          </ion-item>
        </ion-list>

        <ion-list>
          <ion-item>
            <ion-label>班级</ion-label>
            <ion-select (ionChange)="getClasses($event)">
              <ion-select-option value='1'>1</ion-select-option>
              <ion-select-option value='2'>2</ion-select-option>
              <ion-select-option value='3'>3</ion-select-option>
              <ion-select-option value='4'>4</ion-select-option>
              <ion-select-option value='5'>5</ion-select-option>
              <ion-select-option value='6'>6</ion-select-option>
            </ion-select>
          </ion-item>
        </ion-list>

      </ion-list>
      <ion-button type="submit" expand="full" color="primary" (click)="savePerson()">
        保存
      </ion-button>  
    </form>
  </div>

</ion-content>
